<template>
	<view style="padding: 20px;">
		<!-- 实现Log打印 -->
		<button @click="onLog()">console.log</button>
		
		<button @click="onDebug()">console.debug</button>
		
		<button @click="onInfo()">console.info</button>
		
		<button @click="onWarn()" type="warn">console.warn</button>
		
		<button @click="onError()" type="warn">console.error</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title:'打印日志'
			}
		},
		methods: {
			// 常规写法
			onLog() {
				console.log("onLog()--"+this.title);
				// clog
				console.log("clog");
				// clogv
				console.log('---this.title: ',this.title);
			},
			onError() {
				if(name==='xmy') {
					console.log('验证正确');
				}else {
					console.error("错误")
				}
			}
		}
	}
</script>

<style>
button {
	margin-top: 10px;
}
</style>
